import { http } from "@/utils/http";

type ListResult = {
  code: number;
  message: string;
  list: Array<any>;
};
// 获取热门问题列表 /api/index/questions
export function questions(params?: object): Promise<{}> {
  return http.request({
    url: "/api/index/questions",
    method: "get",
    params
  });
}
// 大模型对话接口 /api/index/completions
export function completions(data?: object): Promise<{}> {
  return http.request({
    url: "/api/index/completions",
    method: "post",
    data,
    responseType: "stream"
  });
}


